<h1>Listing companies <%= link_to "Log out", admin_logout_path %></h1>

<div class="fbblueboxlite" style="margin-left:250px; width:690px">
  <div class="fbgreybox"><h2>Companies</h2></div>
  <table>
    <tr>
      <th style="width:400px; text-align:left;">Company name</th>
      <th style="width:150px;text-align:left;">Telephone</th>
      <th></th>
      <th></th>
      <th></th>
    </tr>

    <% @companies.each do |company| %>
        <tr>
          <td><%= company.name %> </td>
          <td><%= company.tel %></td>
          <td><%= link_to 'Show', company %></td>
          <td><%= link_to 'Edit', edit_company_path(company) %></td>
          <td><%= link_to 'Delete', company, :confirm => 'Are you sure?', :method => :delete %></td>
        </tr>
    <% end %>
  </table>
</div>

<br />
<div class="fbgreybox" style="margin-left:250px; width:690px">
  <%= button_to 'New Company', new_company_path %>
</div>